44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'dev'
|
|
|
|
jobs:
|
|
github-pages:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Build
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
-
|
|
name: Gen dummy page
|
|
run: |
|
|
mkdir public
|
|
cat > public/index.html <<EOL
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>GitHub Pages deployed!</title>
|
|
</head>
|
|
<body>
|
|
<p>GitHub Pages with <strong>${{ github.sha }}</strong> commit ID has been deployed through <a href="https://github.com/marketplace/actions/github-pages">GitHub Pages action</a> successfully on <strong>$(date)</strong>.</p>
|
|
</body>
|
|
</html>
|
|
EOL
|
|
-
|
|
name: Deploy
|
|
if: success()
|
|
uses: ./
|
|
with:
|
|
target_branch: gh-pages
|
|
build_dir: public
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|