Created
January 31, 2024 04:49
-
-
Save cmckni3/014b6a41096f0084861020f72a82b86e to your computer and use it in GitHub Desktop.
GitHub Actions GitHub Pages template
This file contains hidden or 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 presentation to GitHub pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["master"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
# Recommended if you intend to make multiple deployments in quick succession. | |
concurrency: ci-${{ github.ref }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ๐๏ธ | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 8.x | |
- name: Install and Build ๐ง | |
env: | |
BASE_HREF: /${{ github.event.repository.name }}/ | |
run: | | |
echo "Installing dependencies" | |
yarn install | |
echo "Building presentation..." | |
yarn build | |
- name: Deploy ๐ | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist | |
git-config-name: github-actions[bot] | |
git-config-email: github-actions[bot]@users.noreply.github.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment