-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (40 loc) · 1.36 KB
/
build_pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Workflow to build and deploy to your GitHub Pages repo.
# Edit your project details here.
# Remember to add API_TOKEN_GITHUB in repo Settings > Secrets as well!
env:
githubEmail: <YOUR GITHUB EMAIL ADDRESS>
deployToRepo: <NAME OF REPO TO DEPLOY TO (E.G. <YOUR USERNAME>.github.io)>
name: Github Pages Astro CI
on:
# Triggers the workflow on push and pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
workflow_run:
workflows: ["Scan YTube"]
types:
- completed
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Install dependencies with npm
- name: Install dependencies
run: cd website && npm install
# Build the project and add .nojekyll file to supress default behaviour
- name: Build
run: |
cd website
npm run build
touch ./dist/.nojekyll
# Push to your pages repo
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: gh-pages # The branch the action should deploy to.
folder: website/dist # The folder the action should deploy.