github-pages-deploy-action/.github/workflows/integration.yml

108 lines
2.9 KiB
YAML
Raw Normal View History

2019-11-19 23:11:21 +08:00
name: integration-tests
on:
2019-09-06 10:34:59 +08:00
schedule:
2019-11-22 23:04:37 +08:00
- cron: 10 15 * * 0-6
push:
branches:
- dev
- releases/v3
jobs:
2020-01-12 08:24:34 +08:00
# Deploys using checkout@v1 with an ACCESS_TOKEN.
integration-checkout-v1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build and Deploy
2020-01-14 23:19:04 +08:00
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: integration
BASE_BRANCH: dev
TARGET_FOLDER: montezuma
2020-01-12 08:24:34 +08:00
# Deploys using checkout@v2 with a GITHUB_TOKEN.
integration-checkout-v2:
2020-01-12 08:13:51 +08:00
needs: integration-checkout-v1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Deploy
2020-01-14 23:19:04 +08:00
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
2020-01-12 09:26:08 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: integration
BASE_BRANCH: dev
TARGET_FOLDER: montezuma2
# Deploys using a container that requires you to install rsync.
integration-container:
needs: integration-checkout-v2
runs-on: ubuntu-latest
container:
image: ruby:2.6
env:
LANG: C.UTF-8
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: Build and Deploy
2020-01-14 23:19:04 +08:00
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: integration
BASE_BRANCH: dev
TARGET_FOLDER: montezuma2
2020-01-12 08:24:34 +08:00
# Deploys using the CLEAN option.
integration-clean:
needs: [integration-checkout-v1, integration-checkout-v2, integration-container]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build and Deploy
2020-01-14 23:19:04 +08:00
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: integration
BASE_BRANCH: dev
CLEAN: true
2020-01-12 08:21:50 +08:00
2020-01-12 08:24:34 +08:00
# Deploys to a branch that doesn't exist.
2020-01-12 08:21:50 +08:00
integration-branch-creation:
needs: [integration-checkout-v1, integration-checkout-v2]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build and Deploy
2020-01-14 23:19:04 +08:00
uses: JamesIves/github-pages-deploy-action@releases/v3
2020-01-12 08:21:50 +08:00
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2020-01-14 23:19:04 +08:00
BRANCH: integration-test-delete-prod
2020-01-12 08:21:50 +08:00
FOLDER: integration
BASE_BRANCH: dev
CLEAN: true
- name: Cleanup Generated Branch
2020-01-12 08:47:17 +08:00
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-01-14 23:19:04 +08:00
branches: integration-test-delete-prod