generated from manastalukdar/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (56 loc) · 1.89 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Should have a step to deploy to gh-pages
name: build-test
on:
push:
branches:
- source
pull_request:
branches:
- source
schedule:
- cron: "0 */13 * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
# Optional, GitHub token
github_token: ${{secrets.GITHUB_TOKEN}}
# Required, workflow file name or ID
workflow: main.yml
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conculsion::
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Default: "completed"
workflow_conclusion: success
branch: main
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them in respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
name: artifacts
# Optional, directory where to extract artifact
path: ./src/website
# Optional, defaults to current repo
repo: computer-science-engineering/readme
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && env.BRANCH == 'source' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src/website
publish_branch: main # default: gh-pages
keep_files: false # default: false
force_orphan: true
commit_message: "GitHub CI Updates [ci skip]"