-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
44 lines (44 loc) · 1.24 KB
/
action.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
name: "Deploy MAC CV to GitHub Pages"
description: "Deploys a MAC CV repository to GitHub Pages"
inputs:
github-token:
description: "The GITHUB_TOKEN secret"
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- name: Check that the repository is correct
shell: bash
run: |
if [ ! -f CV/MAC.json ]; then
echo "CV/MAC.json does not exist"
exit 1
fi
- name: Copy MAC to action directory
shell: bash
run: |
rsync --recursive --ignore-existing CV ${{ github.action_path }}/action/
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Generate pages
shell: bash
working-directory: ${{ github.action_path }}/action
run: |
npm ci --prefix ../
npm ci
mkdir page
npm start -- CV/MAC.json ./page
- name: Create .nojekyll file
shell: bash
working-directory: ${{ github.action_path }}/action
run: |
touch ./page/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ github.action_path }}/action/page
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1