Skip to content

Commit

Permalink
ci: add deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Apr 10, 2022
1 parent 0467935 commit aa96a51
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy

on:
push:
tags:
- v1.*
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cp -r docs .temp
- uses: actions/checkout@v3
with:
ref: gh-pages
clean: false
- run: cp -rf .temp/* .
- run: rm -r .temp
- run: git config user.name "${{ github.actor }}"
- run: git config user.email "${{ github.actor }}@users.noreply.github.com"
- run: git add --all
- run: git commit --message "${{ github.ref_name }}"
- run: git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
*.log
*.map
.DS_Store
.temp
coverage
node_modules

0 comments on commit aa96a51

Please sign in to comment.