Skip to content

Init starter template #1

Init starter template

Init starter template #1

Workflow file for this run

# This is a basic workflow to help you get started with Actions
# -- Taken from Kyle Saburao's deployment workflow file
# https://github.com/kylesaburao/kylesaburao.github.io/blob/main/.github/workflows/deploy.yml
name: CI/CD
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Pull artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build/
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}