Skip to content

Merge pull request #817 from railsgirls-jp/dependabot/bundler/rexml-3… #466

Merge pull request #817 from railsgirls-jp/dependabot/bundler/rexml-3…

Merge pull request #817 from railsgirls-jp/dependabot/bundler/rexml-3… #466

name: Test & Deploy
on:
push:
branches:
- master
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Test job is always triggered as continuous integration
build:
runs-on: ubuntu-latest
steps:
- name: ☑️ Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: 📜 Setup GitHub Pages
id: pages
uses: actions/configure-pages@v3
- name: 🔧 Build static pages & ✅ Test static pages
run: |
bundle exec rake test
env:
JEKYLL_ENV: production
- name: ☁️ Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1