Compare commits
12 Commits
c709ce9e8d
...
5ddd6501b6
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ddd6501b6 | |||
| 268e0a767c | |||
| 44b51ca055 | |||
| 8863ffd1f7 | |||
| 0a179ec3dc | |||
| 16965d779f | |||
| 141c2a0a16 | |||
| 9815ade65a | |||
| ec7f0c2f4f | |||
| 301f32b39c | |||
| 249c00e90c | |||
| 21238c5d41 |
37
.gitea/workflows/test-pr.yml
Normal file
37
.gitea/workflows/test-pr.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Release
|
||||
|
||||
concurrency:
|
||||
cancel-in-progress: true
|
||||
group: test-pr-${{ github.event.pull_request.number }}
|
||||
|
||||
env:
|
||||
ACT_OWNER: ${{ github.repository_owner }}
|
||||
ACT_REPOSITORY: ${{ github.repository }}
|
||||
CGO_ENABLED: 0
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
build_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: git fetch --force --tags
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Install dependencies
|
||||
run: npm ci --legacy-peer-deps
|
||||
- name: Build libraries
|
||||
run: npx nx run-many -t build
|
||||
- name: Run tests
|
||||
run: npx nx run-many -t test --code-coverage --passWithNoTests
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -44,3 +44,4 @@ Thumbs.db
|
||||
vite.config.*.timestamp*
|
||||
.cursor/rules/nx-rules.mdc
|
||||
.github/instructions/nx.instructions.md
|
||||
act_runner*
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
deploy_staging:
|
||||
stage: deploy
|
||||
script:
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_REPO_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
- mkdir -p ~/.ssh && touch ~/.ssh/known_hosts
|
||||
- echo "$SSH_STAGING_KNOWN_HOST" >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
# Make a temp folder
|
||||
- ssh -p22 root@${STAGING_IP} "mkdir -p /var/www/html/${SITE_DIR}_tmp"
|
||||
# Copy the files from the repo to the temp folder
|
||||
- rsync -rav -e ssh --exclude='.git/' --exclude='.gitlab-ci.yml' --exclude='gulpfile.js' --delete-excluded ./ root@${STAGING_IP}:/var/www/html/${SITE_DIR}_tmp
|
||||
# Rename current site into backup
|
||||
- ssh -p22 root@${STAGING_IP} "mv /var/www/html/${SITE_DIR} /var/www/html/${SITE_DIR}_bak"
|
||||
# Copy uploads folder to temp
|
||||
- ssh -p22 root@${STAGING_IP} "cp -rf /var/www/html/${SITE_DIR}_bak/wp-content/uploads /var/www/html/${SITE_DIR}_tmp/wp-content/uploads"
|
||||
# Make the temp folder the actual site
|
||||
- ssh -p22 root@${STAGING_IP} "cp -rf /var/www/html/${SITE_DIR}_tmp /var/www/html/${SITE_DIR}"
|
||||
# Set the ownership and permissions
|
||||
- ssh -p22 root@${STAGING_IP} "find /var/www/html/${SITE_DIR} -type f -exec chmod 644 {} \;"
|
||||
- ssh -p22 root@${STAGING_IP} "find /var/www/html/${SITE_DIR} -type d -exec chmod 755 {} \;"
|
||||
- ssh -p22 root@${STAGING_IP} "chown -R www-data:www-data /var/www/html/${SITE_DIR}"
|
||||
# Remove the old site
|
||||
- ssh -p22 root@${STAGING_IP} "rm -rf /var/www/html/${SITE_DIR}_bak"
|
||||
# Remove the temp site
|
||||
- ssh -p22 root@${STAGING_IP} "rm -rf /var/www/html/${SITE_DIR}_tmp"
|
||||
only:
|
||||
- staging
|
||||
Reference in New Issue
Block a user