diff --git a/.github/workflows/build-branches.yml b/.github/workflows/build-branches.yml index 316a49507fd..98068e346f5 100644 --- a/.github/workflows/build-branches.yml +++ b/.github/workflows/build-branches.yml @@ -6,7 +6,6 @@ on: - master - DevelNUI - API* - - test-actions paths: - 'build/**' diff --git a/.github/workflows/deploy-documents-latest.yml b/.github/workflows/deploy-documents-latest.yml index 5365715f75a..eb0ecfa3228 100644 --- a/.github/workflows/deploy-documents-latest.yml +++ b/.github/workflows/deploy-documents-latest.yml @@ -1,10 +1,5 @@ name: "Deploy Documents Latest" -on: - push: - branches: - - test-actions - jobs: build: diff --git a/.github/workflows/deploy-documents-legacy.yml b/.github/workflows/deploy-documents-legacy.yml new file mode 100644 index 00000000000..1078231524d --- /dev/null +++ b/.github/workflows/deploy-documents-legacy.yml @@ -0,0 +1,65 @@ +name: "Deploy Documents Legacy" + +on: + push: + branches: + - test-actions + +jobs: + + build: + runs-on: [self-hosted, linux, x64] + container: + image: tizendotnet/tizenfx-build-worker:2.4 + options: --ulimit nofile=10240:10240 + + steps: + - uses: actions/checkout@v3 + with: + repository: TizenAPI/TizenFX-Docs + + - name: Checkout TizenFX sources + run: | + ./build_legacy.sh clone + - name: Cache DocFX output + id: cache-site + uses: actions/cache@v2 + with: + path: _site + key: docfx-gh-pages-site-${{ hashFiles('repos/commits') }} + + - name: Build Documents + if: steps.cache-site.outputs.cache-hit != 'true' + run: | + ./build_legacy.sh restore + ./build_legacy.sh build + - name: Archive Artifacts + run: | + tar cfz site.tar.gz _site/ + - uses: actions/upload-artifact@v2 + with: + name: documents + path: site.tar.gz + + deploy: + needs: [build] + runs-on: ubuntu-20.04 + + steps: + - uses: actions/download-artifact@v2 + with: + name: documents + + - name: Extract Artifacts + run: | + tar xfz site.tar.gz + - name: Deploy GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site + keep_files: true + publish_branch: gh-pages + user_name: 'TizenAPI-Bot' + user_email: 'tizenapi@samsung.com' + full_commit_message: 'Update documents' diff --git a/.github/workflows/deploy-documents-test.yml b/.github/workflows/deploy-documents-test.yml index 1e5f1fde1d7..cd4d9643424 100644 --- a/.github/workflows/deploy-documents-test.yml +++ b/.github/workflows/deploy-documents-test.yml @@ -1,10 +1,5 @@ name: "Deploy Documents Test" -on: - push: - branches: - - test-actions - jobs: build: