I have self-hosted runner with the below yml file. Everything runs successfully, but when I ssh into the server and cd to the application directory, the code is one commit behind the main branch. If I run git pull
, it pulls the latest commit. Here is my configuration file:
name: Build and Deploy
on: push
jobs:
Deploy-on-local-runner:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: run npm ci
run: npm ci
- name: npm run build
run: npm run build
I made the change that VonC recommended and it does not appear to have any change in the code. I updated the yml file and changed a test.txt file, and the action ran successfully but did not update the files on disk on the server. When I SSH'd in to the box and ran git pull
this is what I received in response:
kevin@machine:~/projects/project$ git pull
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 6 (delta 2), reused 6 (delta 2), pack-reused 0
Unpacking objects: 100% (6/6), 449 bytes | 64.00 KiB/s, done.
From github.com:user/repo
bc759e9..1e4b98e main -> origin/main
Updating bc759e9..1e4b98e
Fast-forward
.github/workflows/deploy.yml | 3 +++
test.txt | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)