Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
parent
5c0e84017d
commit
5385c9531c
2 changed files with 25 additions and 11 deletions
|
@ -30,15 +30,24 @@ jobs:
|
||||||
rm -rf themes/dot-hugo
|
rm -rf themes/dot-hugo
|
||||||
make all
|
make all
|
||||||
|
|
||||||
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
- name: Fake DNS name for development # TODO: remove this step after switching DNS records
|
||||||
id: artifact-upload-step
|
|
||||||
with:
|
|
||||||
name: site
|
|
||||||
path: |
|
|
||||||
public/
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 10
|
|
||||||
|
|
||||||
- name: Show artifact URL
|
|
||||||
run: |
|
run: |
|
||||||
echo 'Download URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}'
|
echo '185.73.212.7 frostfs.info' >> /etc/hosts
|
||||||
|
|
||||||
|
- name: Setup SSH environment
|
||||||
|
# TODO: add deploy conditions
|
||||||
|
env:
|
||||||
|
SSH_AUTH_SOCK: /tmp/ssh_agent.socket
|
||||||
|
run: |
|
||||||
|
umask 0077
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
|
ssh-keyscan frostfs.info >> ~/.ssh/known_hosts
|
||||||
|
ssh-agent -a "$SSH_AUTH_SOCK"
|
||||||
|
echo "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/key
|
||||||
|
ssh-add ~/.ssh/key
|
||||||
|
rm ~/.ssh/key
|
||||||
|
|
||||||
|
- run: make deploy
|
||||||
|
# TODO: add deploy conditions
|
||||||
|
env:
|
||||||
|
SSH_AUTH_SOCK: /tmp/ssh_agent.socket
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -27,3 +27,8 @@ server: submodules $(HUGO_BIN)
|
||||||
submodules:
|
submodules:
|
||||||
@git submodule init
|
@git submodule init
|
||||||
@git submodule update --recursive --remote
|
@git submodule update --recursive --remote
|
||||||
|
|
||||||
|
.PHONY: deploy
|
||||||
|
deploy:
|
||||||
|
test -f public/index.html
|
||||||
|
cd public && tar --zstd --create . | ssh deploy@frostfs.info frostfs.info
|
||||||
|
|
Loading…
Reference in a new issue