diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index a079153..a6aaddb 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -27,34 +27,9 @@ concurrency: cancel-in-progress: false jobs: - # Build job + # Build site using pr.yml workflow build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Ruby - # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 - uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 - with: - ruby-version: '3.1' # Not needed with a .ruby-version file - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - cache-version: 0 # Increment this number if you need to re-download cached gems - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - name: Build with Jekyll - # Outputs to the './_site' directory by default - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" - env: - JEKYLL_ENV: production - - name: Build CovJSON playground - uses: ./.github/actions/build-playground - with: - outPath: ./_site/playground - - name: Upload artifact - # Automatically uploads an artifact from the './_site' directory by default - uses: actions/upload-pages-artifact@v3 + uses: ./.github/workflows/pr.yml # Deployment job deploy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8025d77..25b33ff 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -5,21 +5,31 @@ on: workflow_dispatch: jobs: - jekyll: + # Build job + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/build-playground - with: - outPath: ./playground - - - uses: helaili/jekyll-action@v2 - with: - build_only: true - jekyll_build_options: -d _site - - - uses: actions/upload-artifact@v4 - with: - name: page - path: _site + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 + uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Build CovJSON playground + uses: ./.github/actions/build-playground + with: + outPath: ./_site/playground + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index f3a532e..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Jekyll build and publish" - -on: - push: - branches: [foo] - workflow_dispatch: - -jobs: - jekyll: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/build-playground - with: - outPath: ./playground - - - uses: helaili/jekyll-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - target_branch: gh-pages