-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.72 KB
/
publish.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Publish
on:
push:
branches:
- master
workflow_dispatch: {}
schedule:
- cron: '0 10,15,20 * * *'
repository_dispatch:
types: [publish]
jobs:
github-pages:
name: Github Pages
runs-on: ubuntu-22.04
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Download lock file
run: wget https://patch.discoverygc.com/patchlist.xml
- name: Cache Freelancer
id: cache-freelancer
uses: actions/cache@v3
with:
key: ${{ runner.os }}-freelancer-discovery-${{ hashFiles('patchlist.xml') }}
path: ${{ github.workspace }}/freelancer_folder
- uses: darklab8/infra/.github/actions/checkout-freelancer@master
if: ${{ steps.cache-freelancer.outputs.cache-hit != 'true' }}
with:
freelancer-mod: "discovery"
freelancer-folder: ${{ github.workspace }}/freelancer_folder
ssh-key-base64-discovery: ${{ secrets.ID_RSA_FILES_FREELANCER_DISCOVERY }}
- name: Set up Go
uses: darklab8/infra/.github/actions/install-go@master
- name: Patch to latest
run: go run ${{ github.workspace }}/autopatch.go -wd ${{ github.workspace }}/freelancer_folder
- name: temporal fix to disco bugs
shell: python
run: |
filename = "${{ github.workspace }}/freelancer_folder/DATA/initialworld.ini"
with open(filename, "r") as file:
data = file.read()
replaced = data.replace("rep = 0.-55, gd_im_grp", "rep = -0.55, gd_im_grp")
with open(filename, "w") as file:
file.write(replaced)
- uses: darklab8/fl-darkstat/.github/actions/build@master
with:
site-root: "/fl-data-discovery/"
freelancer-folder: ${{ github.workspace }}/freelancer_folder
heading: <a href="https://github.com/darklab8/fl-darkstat">Darkstat</a> from <a href="https://darklab8.github.io/blog/pet_projects.html#Freelancercommunity">DarkTools</a> for <a href="https://github.com/darklab8/fl-data-discovery">Freelancer Discovery</a>
relay-host: "https://darkrelay.dd84ai.com"
- uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: ./build
# Turn on ability to deploy to pages in repository settings, Pages tab
# choose "Github Actions" deployment method to Pages
- name: Deploy to pages
uses: actions/deploy-pages@v1
id: deployment