missing paren #768
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: Update Website | |
env: | |
listPublishDirectory: Website | |
pathToCi: ci | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [Build Release] | |
types: | |
- completed | |
release: | |
types: [published, edited, created, unpublished, deleted, released] | |
push: | |
branches: ["main"] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
InitialSetup: | |
name: initial-setup | |
runs-on: ubuntu-latest | |
outputs: | |
releaseTags: ${{ steps.get_latest_release.outputs.data }} | |
latestTag: ${{ steps.get_latest_release.outputs.latest }} | |
steps: | |
- uses: actions/checkout@v3 # check out this repo | |
with: | |
fetch-depth: 0 # fetch all history | |
- name: Get all tags for upcoming matrix | |
id: get_latest_release | |
run: | | |
echo "DATA=[\"1.0.1\", \"1.1.1\", \"OpenFlight-1.7.9\"]" >> "$GITHUB_OUTPUT" | |
echo "LATEST=$(echo $(git tag -l --sort=-creatordate | head -n 1 ))" >> "$GITHUB_OUTPUT" | |
#echo "DATA=[\"$(echo $(git tag --sort=-creatordate ) | sed 's/ /\", \"/g')\"]" >> "$GITHUB_OUTPUT" | |
DocMatrix: | |
needs: InitialSetup | |
strategy: | |
matrix: | |
release-tag: ${{ fromJSON(needs.InitialSetup.outputs.releaseTags) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 # check out this repo | |
with: | |
fetch-depth: 0 # fetch all history | |
ref: ${{ matrix.release-tag }} | |
- name: Checkout files | |
uses: Bhacaz/checkout-files@v2 | |
with: | |
files: docs | |
#modify doxyfile to include tag version | |
- name: edit DoxyFile | |
run: sed -i -e 's/PROJECT_NUMBER =/PROJECT_NUMBER = ${{ matrix.release-tag }}/g' ./docs/Doxygen/DoxygenConfig | |
#Generate the doxygen documentation | |
- name: Generate C# Documentation | |
uses: mattnotmitt/[email protected] | |
with: | |
working-directory: "./docs/Doxygen/" | |
doxyfile-path: "./DoxygenConfig" | |
enable-latex: true | |
- name: Upload these docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.release-tag }} | |
path: './docs' | |
FinalWebBuild: | |
needs: [InitialSetup, DocMatrix] | |
name: final-web-build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 # check out this repo | |
with: | |
fetch-depth: 0 # fetch all history | |
- uses: actions/checkout@v3 # check out automation repo | |
with: | |
#repository: vrchat-community/package-list-action | |
repository: Happyrobot33/package-list-action #TODO: Change this to the main repo once it's merged | |
path: ${{env.pathToCi}} | |
clean: false # otherwise the local repo will no longer be checked out | |
- name: Download Docs | |
uses: actions/download-artifact@v4 | |
with: | |
path: "./docs/" | |
- name: Add to main website | |
run: | | |
echo "* [Latest Scripting Documentation](${{ needs.InitialSetup.outputs.latest }}/Doxygen/html/index.html \":ignore title\")" >> ./docs/_sidebar.md | |
for tag in ${{ join(fromJSON(needs.InitialSetup.outputs.releaseTags), ' ') }} | |
do | |
echo " * [$tag]($tag/Doxygen/html/index.html \":ignore title\")" >> ./docs/_sidebar.md | |
done | |
#Copy docs into the website | |
- name: Copy Docs | |
uses: canastro/copy-action@master | |
with: | |
source: "./docs/." | |
target: "./${{env.listPublishDirectory}}/docs/" | |
flags: "-rp" #recursive and preserve timestamps | |
- name: Restore Timestamps | |
uses: chetan/git-restore-mtime-action@v1 | |
- name: Restore Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{env.pathToCi}}/.nuke/temp | |
~/.nuget/packages | |
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} | |
- name: Build Package Version Listing | |
run: ${{env.pathToCi}}/build.cmd BuildMultiPackageListing --root ${{env.pathToCi}} --list-publish-directory $GITHUB_WORKSPACE/${{env.listPublishDirectory}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#This ensures that the scripts can always refer to the top level copy, allowing us to move it around in the project without issue | |
- name: Copy Data | |
uses: canastro/[email protected] | |
with: | |
source: "./Packages/com.mattshark.openflight/Runtime/data.json" | |
target: "./${{env.listPublishDirectory}}/data-original.json" | |
# Makes the file smaller for everyone to download | |
- name: Minify and copy data.json | |
run: jq -r tostring ./${{env.listPublishDirectory}}/data-original.json > ./${{env.listPublishDirectory}}/data.json | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{env.listPublishDirectory}} | |
#path: '.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |