-
Notifications
You must be signed in to change notification settings - Fork 52
43 lines (33 loc) · 1.08 KB
/
side-projects.yaml
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
name: Update side projects
on:
push:
tags: ["**"]
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
VAGRANT_ORG: PKUHPC
VAGRANT_REPO: scow-vagrant
jobs:
openscow-vagrant:
name: Update openscow-vagrant if not from fork
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.fork == false
steps:
- uses: actions/checkout@v4
- name: Create version file for tag commit
if: github.ref_type == 'tag'
uses: finnp/create-file-action@master
env:
FILE_NAME: "./deploy/vagrant/VERSION"
FILE_DATA: "${{ github.ref_name }}"
- name: Pushes to ${{ env.VAGRANT_ORG }}/${{ env.VAGRANT_REPO }} repo
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.SCOW_DEPLOYMENT_PAT }}
folder: ./deploy/vagrant
repository-name: ${{ env.VAGRANT_ORG }}/${{ env.VAGRANT_REPO }}
branch: ${{ github.ref_type == 'branch' && github.ref_name || 'master' }}