Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
pull_request:
branches:
- redesign
- main
pull_request_review:
types: [submitted]
push:
branches:
- redesign
- main

# Cancel in progress workflows
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
Expand Down Expand Up @@ -60,37 +62,34 @@ jobs:
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v6
- name: Build Astro site
uses: withastro/action@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci
path: .
package-manager: npm
out-dir: dist

- name: Build Astro site
run: npm run build
- name: Upload build artifact for linkChecker
uses: actions/upload-artifact@v4
with:
name: site-dist
path: dist/
if-no-files-found: error

linkChecker:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v6
- name: Download build artifact
uses: actions/download-artifact@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Build Astro site
run: npm run build
name: site-dist
path: dist/

- name: Check links
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: 'CodeQL'

on:
push:
branches: ['gh-pages']
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['gh-pages']
branches: ['main']
schedule:
- cron: '0 0 * * 1'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Crowdin Upload

on:
push:
branches: [gh-pages]
branches: [main]
workflow_dispatch:

permissions:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Website

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'deploy-${{ github.ref }}'
cancel-in-progress: true

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Build and upload pages artifact
uses: withastro/action@v6
with:
path: .
package-manager: npm
out-dir: dist

deploy:
name: deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
schedule:
- cron: '20 7 * * 2'
push:
branches: ['gh-pages']
branches: ['main']

# Declare default permissions as read only.
permissions: read-all
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sync-orama.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
push:
branches:
- redesign
- main
pull_request:
branches:
- redesign
- main

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
expressjs.com
2 changes: 1 addition & 1 deletion src/pages/[lang]/blog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const relatedPosts = [...tagged, ...untagged].slice(0, 3);
as="a"
variant="secondary"
size="sm"
href={`https://github.com/expressjs/expressjs.com/edit/gh-pages/src/content/blog/${Astro.params.slug}`}
href={`https://github.com/expressjs/expressjs.com/edit/main/src/content/blog/${Astro.params.slug}`}
>
<Icon name="github" aria-hidden="true" />
{t('page.editOnGitHub')}
Expand Down
Loading