From 4f8e02d83aa2b4351c98479ea38b93ace1f7cb1d Mon Sep 17 00:00:00 2001 From: haliphax Date: Tue, 12 Mar 2024 15:53:58 -0500 Subject: [PATCH] publishing workflow --- .github/workflows/publish-site.yml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/publish-site.yml diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml new file mode 100644 index 0000000..7da7465 --- /dev/null +++ b/.github/workflows/publish-site.yml @@ -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