-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
43 lines (43 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
# A github action for building archival sites and publishing them to a branch.
name: Build & Publish Archival Site
author: "Archival Team"
branding:
icon: "archive"
color: "green"
inputs:
token:
description: "github token to use. Typically secrets.GITHUB_TOKEN"
required: true
branch:
description: "branch to write output to"
required: false
default: "archival-dist"
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- name: Set Build Dir
id: dist
run: echo "dist=$(bin/archival manifest build-dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Archival Prebuild
run: bin/archival prebuild
shell: bash
- name: Build with Archival
run: bin/archival build
shell: bash
- name: Push to Deploy Branch
uses: s0/git-publish-subdir-action@v2.6.0
env:
REPO: self
BRANCH: ${{ inputs.branch }}
FOLDER: ${{ steps.dist.outputs.dist }}
GITHUB_TOKEN: ${{ inputs.token }}
- name: Deploy
uses: fjogeleit/http-request-action@v1
with:
url: "https://api.archival.dev/sync/${{ github.repository }}/heads/${{ inputs.branch }}"
method: "PUT"