Skip to content

Publish site to GitHub Pages #14

Publish site to GitHub Pages

Publish site to GitHub Pages #14

Workflow file for this run

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:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install npm dependencies
run: yarn --immutable
- name: Run build script
run: yarn workspace site build
- 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:
path: './packages/site/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2