File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Docs
2+
3+ on :
4+ push :
5+ tags :
6+ - " docs@*"
7+
8+ jobs :
9+ deploy :
10+ name : Deploy
11+ runs-on : ubuntu-latest
12+ environment :
13+ name : docs.pluginpal.io
14+ url : https://docs.pluginpal.io/webtools
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v3
18+
19+ - name : Set up Docker
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : ' 14'
23+
24+ - name : Build a Docker image
25+ run : |
26+ cd packages/docs
27+ docker build \
28+ -t docs-webtools:latest .
29+ docker save -o docs-webtools-latest.tar docs-webtools:latest
30+
31+ - name : Transfer the Docker image to the Dokku server
32+ 33+ with :
34+ host : ${{ secrets.SSH_HOST }}
35+ username : ${{ secrets.SSH_CI_USERNAME }}
36+ password : ${{ secrets.SSH_CI_PASSWORD }}
37+ source : packages/docs/docs-webtools-latest.tar
38+ target : /var/lib/dokku/data/storage/docs/docker-images
39+
40+ - name : Deploy the Dokku app based on the Docker image
41+ 42+ with :
43+ host : ${{ secrets.SSH_HOST }}
44+ username : ${{ secrets.SSH_CI_USERNAME }}
45+ password : ${{ secrets.SSH_CI_PASSWORD }}
46+ script_stop : true
47+ script : |
48+ sudo docker load -i /var/lib/dokku/data/storage/docs/docker-images/docs-webtools-latest.tar
49+ DOCS_WEBTOOLS_LATEST_IMAGE=$(sudo docker images --format "{{.ID}}" docs-webtools:latest)
50+ sudo docker tag docs-webtools:latest docs-webtools:$DOCS_WEBTOOLS_LATEST_IMAGE
51+ dokku git:from-image docs-webtools docs-webtools:$DOCS_WEBTOOLS_LATEST_IMAGE
52+ sudo docker system prune --all --force
You can’t perform that action at this time.
0 commit comments