forgejo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
forgejo [2025/03/28 07:45] – ryan | forgejo [2025/03/28 08:03] (current) – [Set up Forgerunner:] ryan | ||
---|---|---|---|
Line 5: | Line 5: | ||
====Set up Forgerunner: | ====Set up Forgerunner: | ||
- | - make a new directory | + | - Copy and paste the following |
- | services: | + | |
- | forgejo-runner: | + | |
- | hostname: forgerunner | + | |
- | image: code.forgejo.org/ | + | |
- | container_name: | + | |
- | environment: | + | |
- | DOCKER_HOST: | + | |
- | user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? | + | |
- | volumes: | + | |
- | - ./ | + | |
- | - / | + | |
- | restart: unless-stopped | + | |
- | + | ||
- | command: forgejo-runner -c / | + | |
- | - save it and create a new folder in the same directory called " | + | |
Line 47: | Line 32: | ||
| | ||
- STOP and verify that something hasn't gone wrong at this step. Check the new config.yaml that was generated. | - STOP and verify that something hasn't gone wrong at this step. Check the new config.yaml that was generated. | ||
+ | |||
- Follow the prompts. Enter your forgejo url and runner token from YourRepo -> Settings -> Actions -> Runners -> Create new runner | - Follow the prompts. Enter your forgejo url and runner token from YourRepo -> Settings -> Actions -> Runners -> Create new runner | ||
+ | |||
+ | - Check the runners list in your repository. It should show up as inactive. | ||
+ | |||
+ | - Navigate to your repo either in browser or locally and create a new file under .forgejo/ | ||
+ | |||
+ | - Inside deploy.yml paste the following: | ||
+ | |||
+ | name: Auto Pull | ||
+ | | ||
+ | on: [push] | ||
+ | #on: | ||
+ | # push: | ||
+ | # branches: | ||
+ | # - ' | ||
+ | | ||
+ | jobs: | ||
+ | deploy: | ||
+ | runs-on: docker | ||
+ | steps: | ||
+ | - name: SSH Deploy | ||
+ | uses: https:// | ||
+ | with: | ||
+ | host: ${{ secrets.HOST_ADDRESS }} | ||
+ | username: forgejo #$ {{ secrets.SSH_USER }} # | ||
+ | key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
+ | script: | | ||
+ | ls | ||
+ | cd homeserver | ||
+ | ${{ secrets.SCRIPT }} | ||
+ | | ||
+ | - The variables used are stored in the settings of your repository under YourRepo -> Settings -> Actions -> Secrets | ||
+ | Make sure to create matching secrets or adjust the variables accordingly. | ||
+ | |||
+ | - Testing required: by commenting out the line "on: [push]" | ||
+ | |||
+ | - Under " | ||
+ | git pull https:// | ||
+ | | ||
+ | Make sure your local repository is synced by pulling or pushing the changes. Now the script should automatically run on every push. |
forgejo.1743147945.txt.gz · Last modified: by ryan