forked from quay/quay-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (89 loc) · 4.31 KB
/
preview.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This is a basic workflow to help you get started with Actions
name: ccutil-workflow
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
#pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
get:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
with:
ref: master
path: source
- uses: actions/checkout@v2
with:
ref: gh-pages
path: dest
- name: whereami
run: |
cd source
pwd
ls
ls ${{ github.workspace }}/
cd ${{ github.workspace }}/
pwd
ls
- uses: addnab/docker-run-action@v3
with:
image: quay.io/rhn_support_gmcgoldr/levccutil
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
cd /work/source/release_notes
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/release_notes/build/tmp/en-US/html-single/* /work/dest/master/release_notes/
cd /work/source/deploy_quay
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/deploy_quay/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay/
cd /work/source/deploy_quay_on_openshift_op_tng
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/deploy_quay_on_openshift_op_tng/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay_on_openshift_op_tng/
cd /work/source/deploy_quay_ha
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/deploy_quay_ha/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay_ha/
cd /work/source/config_quay
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/config_quay/build/tmp/en-US/html-single/* /work/dest/master/config_quay/
cd /work/source/manage_quay
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/manage_quay/build/tmp/en-US/html-single/* /work/dest/master/manage_quay/
cd /work/source/upgrade_quay
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/upgrade_quay/build/tmp/en-US/html-single/* /work/dest/master/upgrade_quay/
cd /work/source/use_quay
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/use_quay/build/tmp/en-US/html-single/* /work/dest/master/use_quay/
cd /work/source/api
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/api/build/tmp/en-US/html-single/* /work/dest/master/api/
cd /work/source/architecture
ccutil compile --lang en_US --type asciidoc --main-file master.adoc
cp -Rf /work/source/architecture/build/tmp/en-US/html-single/* /work/dest/master/architecture/
- name: commit
run: |
cd dest
git status
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
#git diff
#git diff-index --quiet HEAD || (git commit -a -m 'DOCS Auto-update' --allow-empty && git push -f)
git add .
git commit -m "update docs"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: dest
# Runs a single command using the runners shell
# docker run -ti --rm --privileged -v source:/source quay.io/rhn_support_gmcgoldr/levccutil "/bin/bash cd /source/deploy_quay; ls; ccutil compile --lang en_US --type asciidoc --main-file master.adoc; ls -al "