Publish #943
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/fl-configs/.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: actions/setup-go@v3 | |
with: | |
go-version: 1.22.5 | |
- name: Patch to latest | |
run: go run ${{ github.workspace }}/autopatch.go | |
working-directory: ${{ 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#DiscoveryFreelancercommunity">DarkTools</a> for <a href="https://github.com/darklab8/fl-data-discovery">Freelancer Discovery</a> | |
- 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 |