test #307
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
workflow_run: | |
workflows: [deploy-acceptance] | |
types: | |
- completed | |
concurrency: acceptance_env | |
jobs: | |
deploy: | |
name: Acceptance tests | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
environment: acceptance | |
runs-on: ubuntu-22.04 | |
env: | |
APP_DIR: '${HOME}/acc/app' | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
SSH_PORT: ${{ secrets.SSH_PORT }} | |
SSH_USER_WEB: ${{ secrets.SSH_USER_WEB }} | |
steps: | |
- id: ip | |
uses: haythem/[email protected] | |
- name: Setup SSH key | |
run: | | |
mkdir -p ~/.ssh/ | |
ssh-keyscan -H ${SSH_HOST} >> ~/.ssh/known_hosts | |
eval `ssh-agent -s` | |
echo "${SSH_KEY}" | tr -d '\r' | ssh-add - | |
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV | |
- name: Check if webserver is running | |
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} "systemctl status ockovani-acc.service" | |
- name: Test create static pages | |
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} "cd ${APP_DIR} && bash scripts/test_pages.sh" |