Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #120 from EraYaN/master
Browse files Browse the repository at this point in the history
Made GitHub Releases trigger on BuildCompletion, added update submodules command and add publish script for VPS.
  • Loading branch information
EraYaN authored Sep 15, 2019
2 parents fea2ea4 + 170a867 commit 53659f6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
submodules: true
persistCredentials: true

- task: CmdLine@2
displayName: "Update submodules"
inputs:
script: 'git submodule update --recursive --remote'
workingDirectory: '$(Build.SourcesDirectory)'

- task: PowerShell@2
displayName: "DocFX Build"
inputs:
Expand All @@ -25,7 +31,7 @@ jobs:
workingDirectory: '$(Build.SourcesDirectory)'

- task: ArchiveFiles@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
displayName: "Package Documentation Website"
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/_site'
Expand All @@ -38,7 +44,7 @@ jobs:
#quiet: # Optional

- task: GitHubRelease@0
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
displayName: "Create GitHub release"
inputs:
gitHubConnection: Jellyfin Release Download
Expand Down
15 changes: 15 additions & 0 deletions .ci/publish-to-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Download the latest release.
curl -s https://api.github.com/repos/jellyfin/jellyfin-docs/releases/latest | grep "browser_download_url.*docs-.*\.tar\.gz" | cut -d : -f 2,3 | tr -d \" | wget -O /tmp/docs.tar.gz -qi -
# Clean any old files
rm -rf docs/

mkdir -p docs/
pushd docs
# Extract the files
tar -xzf /tmp/docs.tar.gz
popd
git add docs/
git commit -m "CI Documentation update"
git push origin

0 comments on commit 53659f6

Please sign in to comment.