Skip to content

Commit

Permalink
replace github pages module and npm scripts with github action
Browse files Browse the repository at this point in the history
Static builds now get automatically published on a push from the master branch to GitHub pages using a GitHub action.
  • Loading branch information
JoelCDL committed Dec 12, 2022
1 parent e78d4c4 commit 6e636fe
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 255 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Created from starter workflow for GitHub Pages; see: https://github.com/actions/starter-workflows/blob/main/pages/static.yml

name: Publish to GitHub Pages
on:
push
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload build
uses: actions/upload-pages-artifact@v1
with:
path: 'dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
252 changes: 0 additions & 252 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e636fe

Please sign in to comment.