-
Notifications
You must be signed in to change notification settings - Fork 26
40 lines (38 loc) · 1.22 KB
/
publish.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
name: Publish
on:
push:
branches: [main]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get dancelist version
run: echo "HEAD=$(git ls-remote https://github.com/qwandor/dancelist HEAD|cut -f1)" >> $GITHUB_OUTPUT
id: version
- name: Cache .cargo and target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-install-${{ steps.version.outputs.HEAD }}
- name: Install dancelist
run: cargo install --git https://github.com/qwandor/dancelist
- name: Make release directory
run: mkdir release
- name: Concatenate
run: dancelist cat events/ > release/events.yaml
- name: Publish
uses: s0/git-publish-subdir-action@v2.6.0
env:
REPO: self
BRANCH: release
FOLDER: release
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Reload
run: wget --no-verbose -O - https://folkdance.page/reload --post-data reload_token=${{ secrets.RELOAD_TOKEN }}