2020-05-07 05:54:08 +08:00
name : ci
2019-09-01 06:30:48 +08:00
on :
2020-05-09 21:11:59 +08:00
schedule :
- cron : '0 10 * * *' # everyday at 10am
2019-09-01 06:30:48 +08:00
push :
branches :
2020-05-24 07:13:31 +08:00
- dev
- releases/v*
2019-09-01 06:30:48 +08:00
jobs :
2020-05-07 05:54:08 +08:00
ci :
2019-09-01 06:30:48 +08:00
runs-on : ubuntu-latest
steps :
-
name : Checkout
2020-09-29 03:52:50 +08:00
uses : actions/checkout@v2.3.3
2020-04-09 06:59:11 +08:00
-
name : Gen dummy page
2019-09-01 06:30:48 +08:00
run : |
mkdir public
cat > public/index.html <<EOL
<!doctype html>
<html>
<head>
<title>GitHub Pages deployed!</title>
</head>
<body>
2020-05-04 07:22:35 +08:00
<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>
2019-09-01 06:30:48 +08:00
</body>
</html>
EOL
2020-06-28 10:07:30 +08:00
-
name : Check GitHub Pages status
2020-09-20 06:20:09 +08:00
uses : crazy-max/ghaction-github-status@v2
2020-06-28 10:07:30 +08:00
with :
pages_threshold : major_outage
2019-09-01 06:30:48 +08:00
-
name : Deploy
if : success()
2019-10-11 07:41:16 +08:00
uses : ./
2019-09-01 06:30:48 +08:00
with :
2020-05-04 07:18:09 +08:00
target_branch : gh-pages
2019-09-01 06:30:48 +08:00
build_dir : public
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}