I'm struggeling with a github action on a self-hosted server. I hope someone is able to help.
The installed runner is working fine and is able to be activated on a push to the deploy branch. On a push the Action Tab within Github gets a new Job.
Here's the workflow file I'm using:
name: react
on:
push:
branches: [ "deploy" ]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: cd /var/www/subsdrain/code/subsdrain
- run: npm i
- run: npm run build
- run: rm -rf /var/www/subsdrain/www/*
- run: cp -r /var/www/subsdrain/code/subsdrain/build/* /var/www/subsdrain/www
I was thinking it might be caused because I'm missing git fetch or git pull origin deploy for that matter. Both aren't working as well. Any ideas why I'm unable to get the code I see from my deploy branch on github?
according to github actions everything works as intended.
When running the commands manually in the cli the data get's fetched.