Skip to content

Merge pull request #7 from tofran/dependabot/npm_and_yarn/static-site… #27

Merge pull request #7 from tofran/dependabot/npm_and_yarn/static-site…

Merge pull request #7 from tofran/dependabot/npm_and_yarn/static-site… #27

name: Deploy static site
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: "github-pages"
cancel-in-progress: false
jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: ./static-site
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./static-site/.nvmrc
- name: Install lib dependencies
working-directory: ./lib
run: npm ci --no-fund --prefer-offline --no-audit
- name: Install static-site dependencies
run: npm ci --no-fund --prefer-offline --no-audit
- run: npm run build
- name: Upload site
uses: actions/upload-pages-artifact@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
path: ./static-site/build
- name: Deploy site
uses: actions/deploy-pages@v2
id: deployment
if: ${{ github.ref == 'refs/heads/main' }}