Browse Source

Adjusted actions files

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
af7af0dd52
3 changed files with 3 additions and 21 deletions
  1. +0
    -11
      .github/workflows/docs.yml
  2. +1
    -10
      .github/workflows/tag_docs.yml
  3. +2
    -0
      BSIPA.sln

+ 0
- 11
.github/workflows/docs.yml View File

@ -56,14 +56,11 @@ jobs:
Move-Item "$env:ORIGIN_SITE/.git" _site Move-Item "$env:ORIGIN_SITE/.git" _site
Move-Item "$env:ORIGIN_SITE/$env:TAGS_DIR" _site Move-Item "$env:ORIGIN_SITE/$env:TAGS_DIR" _site
Move-Item "$env:ORIGIN_SITE/$env:BRANCH_DIR" _site Move-Item "$env:ORIGIN_SITE/$env:BRANCH_DIR" _site
cd _site cd _site
$ErrorActionPreference = "SilentlyContinue" $ErrorActionPreference = "SilentlyContinue"
git add -A 2>&1 git add -A 2>&1
$srcMessage = (git show -s --format=%B $env:GITHUB_SHA) -join "`n" $srcMessage = (git show -s --format=%B $env:GITHUB_SHA) -join "`n"
git commit -q -a -m "Generated Docs -- $srcMessage" git commit -q -a -m "Generated Docs -- $srcMessage"
git push -q origin gh-pages git push -q origin gh-pages
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
- name: Publish branch site to GitHub pages - name: Publish branch site to GitHub pages
@ -71,29 +68,21 @@ jobs:
working-directory: ./docs working-directory: ./docs
run: | run: |
$ErrorActionPreference = "Continue" $ErrorActionPreference = "Continue"
$branchName = (git rev-parse --abbrev-ref=loose $env:GITHUB_REF) -join "" $branchName = (git rev-parse --abbrev-ref=loose $env:GITHUB_REF) -join ""
$srcMessage = (git show -s --format=%B $env:GITHUB_SHA) -join "`n" $srcMessage = (git show -s --format=%B $env:GITHUB_SHA) -join "`n"
cd $env:ORIGIN_SITE cd $env:ORIGIN_SITE
if (-Not (Test-Path $env:BRANCH_DIR)) { if (-Not (Test-Path $env:BRANCH_DIR)) {
New-Item -ItemType directory -Path $env:BRANCH_DIR New-Item -ItemType directory -Path $env:BRANCH_DIR
} }
$branchPath = "$env:BRANCH_DIR/$branchName" $branchPath = "$env:BRANCH_DIR/$branchName"
if (Test-Path $branchPath) { if (Test-Path $branchPath) {
# force remove it # force remove it
Get-ChildItem -Path $branchPath -Recurse | Remove-Item -Force -Recurse Get-ChildItem -Path $branchPath -Recurse | Remove-Item -Force -Recurse
Remove-Item $branchPath -Force Remove-Item $branchPath -Force
} }
# move generated into place # move generated into place
Move-Item ../_site $branchPath Move-Item ../_site $branchPath
git add -A 2>&1 git add -A 2>&1
git commit -q -a -m "Generated Docs ($branchName) -- $srcMessage" git commit -q -a -m "Generated Docs ($branchName) -- $srcMessage"
git push -q origin gh-pages git push -q origin gh-pages
if: github.ref != 'refs/heads/master' if: github.ref != 'refs/heads/master'

+ 1
- 10
.github/workflows/tag_docs.yml View File

@ -53,28 +53,19 @@ jobs:
working-directory: ./docs working-directory: ./docs
run: | run: |
$ErrorActionPreference = "Continue" $ErrorActionPreference = "Continue"
$tagName = (git rev-parse --abbrev-ref=loose $env:GITHUB_REF) -join "" $tagName = (git rev-parse --abbrev-ref=loose $env:GITHUB_REF) -join ""
cd $env:ORIGIN_SITE cd $env:ORIGIN_SITE
if (-Not (Test-Path $env:TAGS_DIR)) { if (-Not (Test-Path $env:TAGS_DIR)) {
New-Item -ItemType directory -Path $env:TAGS_DIR New-Item -ItemType directory -Path $env:TAGS_DIR
} }
$tagPath = "$env:TAGS_DIR/$tagName" $tagPath = "$env:TAGS_DIR/$tagName"
if (Test-Path $tagPath) { if (Test-Path $tagPath) {
# force remove it # force remove it
Get-ChildItem -Path $tagPath -Recurse | Remove-Item -Force -Recurse Get-ChildItem -Path $tagPath -Recurse | Remove-Item -Force -Recurse
Remove-Item $tagPath -Force Remove-Item $tagPath -Force
} }
# move generated into place # move generated into place
Move-Item ../_site $tagPath Move-Item ../_site $tagPath
git add -A 2>&1 git add -A 2>&1
git commit -q -a -m "Saved tag $tagName" git commit -q -a -m "Saved tag $tagName"
git push -q origin gh-pages
git push -q origin gh-pages

+ 2
- 0
BSIPA.sln View File

@ -29,7 +29,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4D6639A2-BD39-4F9B-AF7F-8E5F3B88243D}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4D6639A2-BD39-4F9B-AF7F-8E5F3B88243D}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml appveyor.yml = appveyor.yml
.github\workflows\docs.yml = .github\workflows\docs.yml
README.md = README.md README.md = README.md
.github\workflows\tag_docs.yml = .github\workflows\tag_docs.yml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollectDependencies", "BuildTools\CollectDependencies\CollectDependencies.csproj", "{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollectDependencies", "BuildTools\CollectDependencies\CollectDependencies.csproj", "{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}"


Loading…
Cancel
Save