Skip to content

Instantly share code, notes, and snippets.

@gorpello
Created December 16, 2021 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gorpello/c486a54df8eab3f059b6c1190b1c8f37 to your computer and use it in GitHub Desktop.
Save gorpello/c486a54df8eab3f059b6c1190b1c8f37 to your computer and use it in GitHub Desktop.
# Name of the Workflow
name: DeployPublish
# Run this workflow only on push on main branch.
on:
push:
branches:
- main
# A workflow run is made up of one or more jobs that
# can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that
# will be executed as part of the job
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Install and Build Swift 🔧
run: swift run
- name: Set Public Folder
run: |
mkdir .public
cp -r Output/* .public
mv .public public
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment