Skip to content

markjreed is deploying a new version #87

markjreed is deploying a new version

markjreed is deploying a new version #87

Workflow file for this run

name: Deploy
run-name: ${{ github.actor }} is deploying a new version
on:
push:
branches:
- 'main'
jobs:
deploy-to-host:
name: "Deploy to hosting provider"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: fetch-tags
run: git fetch --tags
- name: bump-patchlevel
run: |
${{ github.workspace }}/.github/bin/bump-tag "$COMMIT_MSG"
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: get-version
run: git describe --tags HEAD > ${{ github.workspace }}/version.txt
- name: get-commit
run: git rev-parse HEAD > ${{ github.workspace }}/commit.txt
- name: configure-ssh
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/staging.key
chmod 600 ~/.ssh/staging.key
cat >>~/.ssh/config <<END
Host staging
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/staging.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
- name: copy-files
run: |
rsync -Cavz --delete --exclude=.git\* --rsh=ssh ${{ github.workspace }}/. staging:www/foxtrot/.