Skip to content

Commit f020239

Browse files
committed
replace github pages module and npm scripts with github action
Static builds now get automatically published on a push from any branch to GitHub pages using a GitHub action.
1 parent e78d4c4 commit f020239

File tree

3 files changed

+38
-255
lines changed

3 files changed

+38
-255
lines changed

.github/workflows/publish.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Created from starter workflow for GitHub Pages; see: https://github.com/actions/starter-workflows/blob/main/pages/static.yml
2+
3+
name: Publish to GitHub Pages
4+
on: push
5+
permissions:
6+
contents: read
7+
pages: write
8+
id-token: write
9+
concurrency:
10+
group: "pages"
11+
cancel-in-progress: true
12+
jobs:
13+
deploy:
14+
environment:
15+
name: github-pages
16+
url: ${{ steps.deployment.outputs.page_url }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check out repository code
20+
uses: actions/checkout@v3
21+
- name: Use Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '16.x'
25+
cache: 'npm'
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Create build
29+
run: npm run build
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v2
32+
- name: Upload build
33+
uses: actions/upload-pages-artifact@v1
34+
with:
35+
path: 'dist'
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v1

package-lock.json

-252
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)