-
-
Notifications
You must be signed in to change notification settings - Fork 45
49 lines (46 loc) · 1.45 KB
/
predeploy.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
######################################
## Custom HTTP Archive GitHub action ##
######################################
#
# A pre-deploy script that must be run in GitHub Actions to:
# - Generate the scripts
# - Update timestamps and hashes
# - Submit a Pull Request with the changes (if any)
#
# This should be run before every release
#
name: Predeploy script
on:
workflow_dispatch:
jobs:
build:
name: Generate Scripts and Update Timestamps
runs-on: ubuntu-20.04
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup Node.js for use with actions
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run the website
run: ./tools/scripts/run_and_test_website.sh
- name: Update timestamps
run: npm run timestamps
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
title: Pre-deploy Updates
branch-suffix: timestamp
commit-message: Generate Scripts and Update Timestamps
body: |
Generate Scripts and Update Timestamps through GitHub action
- Auto-generated by [create-pull-request][1] GitHub Action
[1]: https://github.com/peter-evans/create-pull-request
- name: Check outputs
run: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"