Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #180
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: Altseed | |
on: | |
push: | |
branches: | |
- master | |
- workflow | |
pull_request: | |
jobs: | |
doc: | |
name: Doc | |
env: | |
DOTNET_VERSION: 5.0.203 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Install docfx | |
run: choco install docfx -Version 2.57.2 | |
- name: Docfx Metadata | |
run: docfx metadata --warningsAsErrors | |
env: | |
MSBuildSDKsPath: ${{ env.DOTNET_ROOT }}\sdk\${{ env.DOTNET_VERSION }}\Sdks | |
- name: Docfx Build | |
run: docfx build | |
env: | |
MSBuildSDKsPath: ${{ env.DOTNET_ROOT }}\sdk\${{ env.DOTNET_VERSION }}\Sdks | |
- name: Upload Artifact (Site) | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Site | |
path: ./Site/ | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: doc | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Download Artifact (Site) | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: Site | |
- name: Checkout (altseed.github.io) | |
uses: actions/checkout@v2 | |
with: | |
repository: altseed/altseed.github.io | |
ref: master | |
path: altseed.github.io | |
- name: Setup git repositories | |
env: | |
WEBSITE_PUBLISH_TOKEN: ${{ secrets.WEBSITE_PUBLISH_TOKEN }} | |
run: | | |
echo "$WEBSITE_PUBLISH_TOKEN" > ~/deploy_key.pem | |
chmod 600 ~/deploy_key.pem | |
git config --global user.email "altseed.gameengine@gmail.com" | |
git config --global user.name "Altseed" | |
cd altseed.github.io | |
git config remote.origin.url "git@github.com:altseed/altseed.github.io.git" | |
git switch master | |
- name: Copy Output | |
run: cp -r ./Site/* ./altseed.github.io/. | |
- name: Deploy | |
env: | |
GIT_SSH_COMMAND: ssh -i ~/deploy_key.pem -o StrictHostKeyChecking=no -F /dev/null | |
run: | | |
cd altseed.github.io | |
git add -A | |
if ! git diff --cached --quiet; then | |
git commit -m "Auto Deploy by Github Actions" -m "https://github.com/altseed/Altseed2-document/commit/$GITHUB_SHA" | |
git pull origin master | |
git push origin master | |
fi |