mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
7cea1d5967
* First pass at deploy key support * Needed * More ssh * Adds keyscan * Another look at this * More things.... * w * Path to home * w * k * Update git.ts * ff * dd * test * File Sync maybe * Adds SSH Examples * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * x * c * Update README.md * Integration tests * Update integration-beta.yml * More Changes
166 lines
4.3 KiB
YAML
166 lines
4.3 KiB
YAML
name: integration-tests
|
|
on:
|
|
schedule:
|
|
- cron: 10 15 * * 0-6
|
|
push:
|
|
branches:
|
|
- dev
|
|
- releases/v3
|
|
|
|
jobs:
|
|
# 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
|
|
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
|
|
|
|
# Deploys using checkout@v2 with a GITHUB_TOKEN.
|
|
integration-checkout-v2:
|
|
needs: integration-checkout-v1
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build and Deploy
|
|
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
|
|
|
|
|
|
# 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
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install rsync
|
|
run: |
|
|
apt-get update && apt-get install -y rsync
|
|
|
|
- name: Build and Deploy
|
|
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
|
|
|
|
# Deploys using an SSH key.
|
|
integration-ssh:
|
|
needs: integration-container
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install SSH Client
|
|
uses: webfactory/ssh-agent@v0.2.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
- name: Build and Deploy
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
with:
|
|
SSH: true
|
|
BRANCH: gh-pages-beta
|
|
FOLDER: integration
|
|
BASE_BRANCH: dev
|
|
TARGET_FOLDER: montezuma3
|
|
|
|
# Deploys using a custom env.
|
|
integration-env:
|
|
needs: integration-ssh
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '10.x'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install SSH Client
|
|
uses: webfactory/ssh-agent@v0.2.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
- name: Build and Deploy
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
with:
|
|
SSH: true
|
|
BRANCH: gh-pages-beta
|
|
FOLDER: integration
|
|
BASE_BRANCH: dev
|
|
TARGET_FOLDER: montezuma4
|
|
|
|
# Deploys using the CLEAN option.
|
|
integration-clean:
|
|
needs: [integration-checkout-v1, integration-checkout-v2, integration-container, integration-ssh, integration-env]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Build and Deploy
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
with:
|
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
BRANCH: gh-pages
|
|
FOLDER: integration
|
|
BASE_BRANCH: dev
|
|
CLEAN: true
|
|
|
|
# Deploys to a branch that doesn't exist.
|
|
integration-branch-creation:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Build and Deploy
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
with:
|
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
BRANCH: integration-test-delete-prod
|
|
FOLDER: integration
|
|
BASE_BRANCH: dev
|
|
CLEAN: true
|
|
|
|
- name: Cleanup Generated Branch
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branches: integration-test-delete-prod
|