Skip to content

Commit

Permalink
Merge pull request #5 from Automattic/feature/staging-deploys
Browse files Browse the repository at this point in the history
Update the deploy script to use new secrets.
  • Loading branch information
ryanwelcher authored Feb 6, 2025
2 parents e7c7501 + e0b679a commit 8030409
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy plugin
name: Deploy plugin to Production

on:
workflow_dispatch:
Expand All @@ -20,6 +20,6 @@ jobs:
uses: Automattic/[email protected]
with:
ftp-server: sftp://sftp.wp.com/htdocs/wp-content/plugins/custom-plugin/
ftp-username: ${{ secrets.SFTP_USER }}
ftp-password: ${{ secrets.SFTP_PASSWORD }}
ftp-username: ${{ secrets.PROD_SFTP_USER }}
ftp-password: ${{ secrets.PROD_SFTP_PASSWORD }}
git-ftp-args: --insecure
1 change: 1 addition & 0 deletions .github/workflows/pull-request-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- trunk
- staging

jobs:
php:
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ It will give you all of the tools you needs to get up and running quickly.
## How do I use it?

1. Start by clicking the `Use this template` to use this as a starting point for your project.
2. In the Secrets and Variables->Actions under the Settings menu of the new repository. Create new `SFTP_USER` and `SFTP_PASSWORD` secrets and add the credentials provided by Newspack for each.
2. In the Secrets and Variables->Actions under the Settings menu of the new repository. Create new the secrets outline in the table below.
3. Checkout the repo locally and run `npm run setup` to install everything.
4. Start developing!

### Secrets

| Secret | Description |
| --------------------- | ------------------------------------------- |
| PROD_SFTP_USER | The username for the Production SFTP server |
| PROD_SFTP_PASSWORD | The password for the Production SFTP server |
| STAGING_SFTP_USER | The username for the Staging SFTP server |
| STAGING_SFTP_PASSWORD | The password for the Staging SFTP server |

0 comments on commit 8030409

Please sign in to comment.