ghaction-github-pages/.github/workflows/test.yml
2019-09-01 01:21:12 +02:00

39 lines
945 B
YAML

name: test
on:
push:
branches:
- master
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Build
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.</p>
</body>
</html>
EOL
-
name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@master
with:
target_branch: test
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}