Skip to content

Deploy GitHub Pages #14

Deploy GitHub Pages

Deploy GitHub Pages #14

Workflow file for this run

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy GitHub Pages
on:
# Runs on pushes targeting the default branch
# push:
# branches: ["main"]
# paths-ignore:
# - '**.github/workflows/*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Generate appcast job
appcast:
runs-on: macos-latest
steps:
- name: Download Latest Release
run: curl -L -o ishare_macOS.zip https://github.com/castdrian/ishare/releases/latest/download/ishare_macOS.zip
- name: Download Sparkle
run: |
curl -L -o Sparkle-2.4.2.tar.xz https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz
- name: Extract Sparkle
run: tar -xJf Sparkle-2.4.2.tar.xz
- name: Prepare updates folder
run: |
mkdir updates
mv ishare_macOS.zip updates/
- name: Set executable bit for generate_appcast
run: chmod +x ./bin/generate_appcast
- name: Generate appcast.xml
run: echo "$EDDSA_PRIVATE_KEY" | ./bin/generate_appcast --ed-key-file - updates/
env:
EDDSA_PRIVATE_KEY: ${{ secrets.EDDSA_PRIVATE_KEY }}
ARCHIVES_SOURCE_DIR: .
- name: Archive appcast.xml as artifact
uses: actions/upload-artifact@v2
with:
name: appcast
path: ./updates/appcast.xml
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: appcast
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download appcast.xml artifact
uses: actions/download-artifact@v2
with:
name: appcast
path: ./
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2