-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (44 loc) · 1.37 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
49
50
51
52
53
54
55
name: CI
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
installer-check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache the spacemacs repository folder
uses: actions/[email protected]
with:
path: ~/.emacs.d
key: saved-emacs-d-${{ matrix.os }}
- name: Create a placeholder folder for org-roam
run: mkdir ~/org/home/roam -p
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Install everything needed for the spacemacs config
run: ./installer.sh ${{ steps.branch-name.outputs.current_branch }}
shell: bash
- name: Copy the generated index.html to the checked out repo path
run: |
mkdir ~/work/dot-spacemacs/dot-spacemacs/public
cp ~/.spacemacs.d/docs/index.html ~/work/dot-spacemacs/dot-spacemacs/public
- name: GitHub Pages
if: matrix.os == 'ubuntu-20.04' && success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: public
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}