Skip to content

Commit

Permalink
publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Mar 12, 2024
1 parent 51997f0 commit 4f8e02d
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish site

on:
push:
branches: [main]

workflow_dispatch:

concurrency:
cancel-in-progress: true
group: publish-site

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm

- uses: aquacash5/npm-gpr-auth@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Build site
run: npm run build

- name: Relative URLs
run: sed -i -e 's/="\//="/g' html/*.html

- uses: actions/upload-pages-artifact@v2
with:
path: html/

deploy:
runs-on: ubuntu-latest
needs: build

permissions:
pages: write
id-token: write

environment:
name: pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 4f8e02d

Please sign in to comment.