-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.24 KB
/
main.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
# 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: emchateau@laposte.net
deployToRepo: ouvroir/site-lab
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]
# 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
# Update references
- name: Git Submodule Update
run: git submodule update --init --recursive
# Install dependencies with npm
- name: Install dependencies
run: npm ci
# Build the project and add .nojekyll file to supress default behaviour
- name: Build
run: |
npm run build
touch ./dist/.nojekyll
# Push to your pages repo
- name: Push to pages repo
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
branch: gh-pages
folder: dist