Skip to content

Commit

Permalink
feat: New website deployment pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
alainncls committed Mar 22, 2024
1 parent 1484d8f commit 71d1ec5
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ name: Publish site to GitHub Pages
on:
workflow_dispatch:

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

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
publish-site-to-gh-pages:
name: Publish site to GitHub Pages
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
Expand All @@ -22,8 +31,17 @@ jobs:
run: yarn --immutable
- name: Run build script
run: yarn workspace site build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Prepare for deployment
run: |
echo "lxp-snap.linea.build" > packages/site/public/CNAME
echo "User-Agent: *" > packages/site/public/robots.txt
echo "Disallow: /" >> packages/site/public/robots.txt
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/site/public
path: './packages/site/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 71d1ec5

Please sign in to comment.