Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the deploy script to use new secrets. #5

Merged
merged 7 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |