Skip to content

Commit fe6ffe7

Browse files
authored
Create publish-pages.yml
1 parent c58a1b2 commit fe6ffe7

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish-pages.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js Publish webpage
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [16.x]
23+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
- run: npm run install-build
32+
- name: Publish to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: build/site

0 commit comments

Comments
 (0)