From 20bea18c795c2809a2e8a6d4ecaa2264b4b3d5db Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 11 Oct 2024 13:19:48 -0700 Subject: [PATCH] actions: simplify to single yml --- .github/workflows/deploy.yml | 6 ++++-- .github/workflows/test-deploy.yml | 31 ------------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/test-deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f76a76a..b869ba6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,6 @@ -name: Deploy -on: [push] +name: Build & Deploy + +on: [push, pull_request] jobs: deploy: @@ -38,6 +39,7 @@ jobs: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.repository == 'openfl/books.openfl.org' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./deploy diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml deleted file mode 100644 index 22ad32e..0000000 --- a/.github/workflows/test-deploy.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Test deployment -on: [pull_request] - -jobs: - test-deploy: - - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v2 - with: - submodules: true - - - uses: actions/checkout@v2 - with: - repository: openfl/OpenFLDevelopersGuide - path: OpenFLDevelopersGuide - - - uses: actions/checkout@v2 - with: - repository: openfl/AS3ConversionGuide - path: AS3ConversionGuide - - - name: Install dependencies - run: | - npm install -g gitbook-cli@2.2.0 - - - name: Build - run: | - gitbook build OpenFLDevelopersGuide - gitbook build AS3ConversionGuide