Skip to content

Update main.yml

Update main.yml #1

Workflow file for this run

name: Build and Publish Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
working-directory: ./EXILED
env:
EXILED_REFERENCES_URL: https://misaka-zerotwo.github.io/SL-References/Master.zip
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
jobs:
build_and_publish_docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.7.2
- name: Setup Nuget
uses: iRebbok/setup-nuget@master
- name: Get references
shell: pwsh
run: |

Check failure on line 35 in .github/workflows/docs.yml

View workflow run for this annotation

GitHub Actions / Build and Publish Docs

Invalid workflow file

The workflow is not valid. .github/workflows/docs.yml (Line: 35, Col: 14): Unrecognized named-value: 'EXILED_REFERENCES_URL'. Located at position 1 within expression: EXILED_REFERENCES_URL
Invoke-WebRequest -Uri ${{ EXILED_REFERENCES_URL }} -OutFile ${{ github.workspace }}/EXILED/References.zip
Expand-Archive -Path References.zip -DestinationPath ${{ env.EXILED_REFERENCES_PATH }}
- name: Download DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx --pre
- name: Run DocFX
env:
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
run: docfx docfx.json; docfx docfx.json
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && success() #Only publishes on push to master to avoid docs mishaps
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: _site
keep_history: true
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}