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 f04162b
Show file tree
Hide file tree
Showing 2 changed files with 10,926 additions and 10,872 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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

- name: Configure sources
run: npm config set //npm.pkg.github.com/:_authToken=${vars.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: github-pages
url: ${{ steps.deployment.outputs.page_url }}

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

0 comments on commit f04162b

Please sign in to comment.