Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
update branch of docs-template and clear space
  • Loading branch information
DMGithubPublisher authored Oct 17, 2023
1 parent 5810c1b commit 7deddf7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,27 @@ jobs:
- name: Run a multi-line script
run: |
cd /home/ubuntu
[ -d CompanyDoc ] && rm -rf CompanyDoc
[ -d company-docs ] && rm -rf company-docs
[ -d Docs-Template-Repo-Old-Master ] && rm -rf Docs-Template-Repo-Old-Master
[ ! -d CompanyDoc ] && mkdir -p CompanyDoc
[ ! -d company-docs ] && git clone --depth 1 https://github.com/Dynamsoft/company-docs.git
cd company-docs && git pull && cd .. && cp -rfp ./company-docs/* ./CompanyDoc/
cd Docs-Template-Repo && git pull && cd .. && cp -rfp ./Docs-Template-Repo/* ./CompanyDoc/
cd CompanyDoc && bundle exec jekyll build --incremental
git clone --depth 1 https://github.com/dynamsoft-docs/company-docs.git company-docs
git clone --depth 1 --branch old-master https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Old-Master
cp -rfp ./company-docs/* ./CompanyDoc/
cp -rfp ./Docs-Template-Repo-Old-Master/* ./CompanyDoc/
cd CompanyDoc && bundle install && bundle exec jekyll build
python3 /home/ubuntu/ftp.py /home/ubuntu/CompanyDoc/_site/ ./www.dynamsoft.com/company/docs/ prod
- name: Trigger Webhook
run: |
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/company/docs/*\"]" ${{ secrets.WEBHOOK_URL }}
- name: Run a multi-line script
run: |
cd /home/ubuntu
[ -d CompanyDoc ] && rm -rf CompanyDoc
[ -d company-docs ] && rm -rf company-docs
[ -d Docs-Template-Repo-Old-Master ] && rm -rf Docs-Template-Repo-Old-Master

0 comments on commit 7deddf7

Please sign in to comment.