Deploy Github Pages #603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Github Pages | |
on: | |
push: | |
branches: | |
- source | |
schedule: | |
- cron: '30 */24 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
gh-pages: | |
runs-on: ubuntu-latest | |
container: | |
image: "swift:5.5" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.build | |
.publish | |
key: ${{ runner.os }}-spm-${{ hashFiles('./Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Build Publish | |
run: | | |
git clone https://github.com/JohnSundell/Publish.git | |
cd Publish | |
make | |
- name: Generate Site | |
run: publish generate | |
- name: Create CNAME | |
run: | | |
cd ./Output | |
echo "www.abespodcast.com" > CNAME | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v2 | |
env: | |
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
PUBLISH_BRANCH: master | |
PUBLISH_DIR: ./Output |