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 a1d4a84
Show file tree
Hide file tree
Showing 4 changed files with 10,930 additions and 10,874 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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=${{ secrets.GITHUB_TOKEN }}
npm login --scope=@haliphax --registry=https://npm.pkg.github.com/
- 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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
Loading

0 comments on commit a1d4a84

Please sign in to comment.