mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-14 22:29:17 +08:00
docs: Add Swift Publish example (#228)
https://github.com/JohnSundell/Publish Close #227
This commit is contained in:
parent
596c2d5548
commit
9f90987bad
38
README.md
38
README.md
@ -93,6 +93,7 @@ Notes: Actually, the `GITHUB_TOKEN` works for deploying to GitHub Pages but it h
|
|||||||
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
|
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
|
||||||
- [⭐️ Elm](#%EF%B8%8F-elm)
|
- [⭐️ Elm](#%EF%B8%8F-elm)
|
||||||
- [⭐️ github/personal-website](#%EF%B8%8F-githubpersonal-website)
|
- [⭐️ github/personal-website](#%EF%B8%8F-githubpersonal-website)
|
||||||
|
- [⭐️ Swift Publish](#%EF%B8%8F-swift-publish)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [Maintainer](#maintainer)
|
- [Maintainer](#maintainer)
|
||||||
|
|
||||||
@ -925,6 +926,43 @@ jobs:
|
|||||||
cname: github.peaceiris.com
|
cname: github.peaceiris.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ⭐️ Swift Publish
|
||||||
|
|
||||||
|
An example workflow for [JohnSundell/Publish].
|
||||||
|
|
||||||
|
[JohnSundell/Publish]: https://github.com/JohnSundell/Publish
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: GitHub Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup JohnSundell/Publish
|
||||||
|
run: |
|
||||||
|
cd ${HOME}
|
||||||
|
git clone --depth=1 https://github.com/JohnSundell/Publish.git
|
||||||
|
cd ./Publish
|
||||||
|
swift build -c release
|
||||||
|
echo "::add-path::${HOME}/Publish/.build/release"
|
||||||
|
|
||||||
|
- run: publish-cli generate
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./Output
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
Loading…
x
Reference in New Issue
Block a user