👷 fix script

This commit is contained in:
platane
2020-10-02 18:06:50 +02:00
committed by Platane
parent 64f0b872aa
commit 2125640716
3 changed files with 22 additions and 30 deletions

View File

@@ -1,29 +0,0 @@
name: deploy
on:
push:
branches:
- master
jobs:
deploy-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1.4.2
with:
node-version: 14
- uses: bahmutov/npm-install@v1.4.1
- run: yarn build:demo
env:
BASE_PATHNAME: "snk"
- uses: crazy-max/ghaction-github-pages@v2.1.1
with:
target_branch: gh-pages
build_dir: packages/demo/dist
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}

View File

@@ -1,6 +1,6 @@
name: main
on: [push, pull_request]
on: push
jobs:
test:
@@ -57,3 +57,24 @@ jobs:
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}
deploy-ghpages:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1.4.2
with:
node-version: 14
- run: yarn build:demo
env:
BASE_PATHNAME: "snk"
- uses: crazy-max/ghaction-github-pages@v2.1.1
if: success() && github.ref == 'refs/heads/master'
with:
target_branch: gh-pages
build_dir: packages/demo/dist
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}