Add test workflow
This commit is contained in:
parent
9d07e7f3bd
commit
f5ed7ad79c
38
.github/workflows/test.yml
vendored
Normal file
38
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
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: gh-pages
|
||||
build_dir: public
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,3 +1,6 @@
|
|||
[](https://github.com/crazy-max/ghaction-github-pages/releases/latest)
|
||||
[](https://github.com/marketplace/actions/github-pages)
|
||||
[](https://github.com/crazy-max/ghaction-github-pages/actions)
|
||||
[](https://www.patreon.com/crazymax)
|
||||
[](https://www.paypal.me/crazyws)
|
||||
|
||||
|
@ -9,7 +12,7 @@ A GitHub Action for deploying GitHub Pages
|
|||
|
||||
## 🚀 Usage
|
||||
|
||||
Below is a simple to deploy to GitHub Pages:
|
||||
Below is a simple to deploy to GitHub Pages. A [live example](https://github.com/crazy-max/ghaction-github-pages/actions) is also available for this repository.
|
||||
|
||||
```yaml
|
||||
name: website
|
||||
|
@ -34,7 +37,7 @@ jobs:
|
|||
<title>GitHub Pages deployed!</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>GitHub Pages with <strong>${{ github.sha }}</strong> commit ID has been deployed through <a href="">GitHub Pages action</a> successfully.</p>
|
||||
<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
|
||||
|
|
Loading…
Reference in New Issue
Block a user