-
-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (31 loc) · 955 Bytes
/
auto-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Automatically deploy new tag onto github pages
on:
push:
tags:
- v*
jobs:
deploy:
name: Deploy new version
runs-on: ubuntu-latest
env:
CI: ''
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'npm'
- name: install dependencies
run: npm ci
- name: deploy with gh-pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions-bot"
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version
git push
npm run deploy