ghaction-github-pages/.github/workflows/ci.yml
CrazyMax 45b1e3298a
Allow to overwrite on copy to temp folder
Show changed files in group
2020-11-11 22:44:11 +01:00

48 lines
1.2 KiB
YAML

name: ci
on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
branches:
- dev
- releases/v*
jobs:
ci:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Gen dummy page
run: |
mkdir public
touch public/file{0001..3000}
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: Check GitHub Pages status
uses: crazy-max/ghaction-github-status@v2
with:
pages_threshold: major_outage
-
name: Deploy
if: success()
uses: ./
with:
target_branch: gh-pages
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}