Skip to content

Commit 0e794bb

Browse files
committed
chore: update readme to match with v2 version
1 parent 87d6fe3 commit 0e794bb

1 file changed

Lines changed: 30 additions & 62 deletions

File tree

README.md

Lines changed: 30 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,52 @@
1+
![Square Cloud](https://cdn.discordapp.com/attachments/994857159575740486/1309613607109263390/image.png?ex=67423837&is=6740e6b7&hm=9e79d237f95c317a0dfe1a4e2b559d4325db62f590afed0e7eab9a195488b694&)
2+
13
# Square Cloud Action
4+
25
The easiest way to integrate your Square Cloud app with GIT, commit your app from github workflows.
36

4-
# Usage
7+
## Usage
58

69
### Pre-requisites
7-
Create a `.yml` workflow file in the `.github/workflows` directory. Here is an [example workflow](#example-workflow). If you want to know more about workflows, see the official GitHub Help Documentation on how to [create a workflow file](https://docs.github.com/en/actions/using-workflows#creating-a-workflow-file)
810

9-
You also need to configure your GitHub secrets, of course, to not let your Token API be exposed. See how to [configure your GitHub secrets](#configuring-secrets).
11+
Create a `.yml` workflow file in the `.github/workflows` directory.
12+
Here is an [example workflow](#example-workflow).
13+
If you want to know more about workflows, see the official GitHub Help Documentation on how to [create a workflow file](https://docs.github.com/en/actions/using-workflows#creating-a-workflow-file)
14+
15+
You also need to configure your GitHub secrets, of course, to not let your Token API be exposed.
1016

1117
### Inputs
12-
- `token` - Your Square Cloud api token. Get your token from the [Square Cloud dashboard](https://squarecloud.app/dashboard/me) `Required`
13-
- `application_id` - Your Square Cloud application ID. `Required`
14-
- `restart` - After commit, does the application need to be restarted? `Optional`, `Default: False`
15-
- `excludes` - Files that shouldn't be uploaded to Square Cloud. (by default, includes `.git`) `Optional`
18+
19+
- `token` - Your Square Cloud api token. Get your token from the [Square Cloud dashboard](https://squarecloud.app/dashboard) `Required`
20+
- `command` - The command you want to execute `Optional`
21+
- `install-only` - In case you just want to install the CLI in your workflow `Optional`
22+
- `workdir` - The directory you want to work with the Action `Optional`
1623

1724
### Example Workflow
18-
#### Uploading your application and restarting it
19-
```yml
20-
name: "Commit project to Square Cloud"
21-
on: push
2225

23-
jobs:
24-
deploy:
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v3
28-
with:
29-
fetch-depth: '0'
30-
31-
- name: Commit to Square Cloud
32-
uses: squarecloudofc/github-action@v1.3.0
33-
with:
34-
restart: true
35-
token: '${{ secrets.SQUARE_TOKEN }}'
36-
application_id: '${{ secrets.SQUARE_APPLICATIONID }}'
37-
```
26+
##### Commiting your project to Square Cloud
3827

39-
#### Uploading your application with file exclusions
40-
```yml
41-
name: "Commit project to Square Cloud"
42-
on: push
28+
Useful if you just want update the source code of your application
4329

30+
```yml
31+
name: Publish
32+
on:
33+
push:
34+
branches:
35+
- master
4436
jobs:
45-
deploy:
37+
publish-production:
38+
name: Publish
4639
runs-on: ubuntu-latest
4740
steps:
48-
- uses: actions/checkout@v3
49-
with:
50-
fetch-depth: '0'
51-
52-
- name: Commit to Square Cloud
53-
uses: squarecloudofc/github-action@v1.3.0
41+
- name: Setup Square Cloud
42+
uses: squarecloudofc/github-action@v2
43+
# in the run command you can add the --restart flag to restart your application after the commit
5444
with:
45+
run: commit ${{ secrets.SQUARE_APPLICATION_ID }}
5546
token: '${{ secrets.SQUARE_TOKEN }}'
56-
application_id: '${{ secrets.SQUARE_APPLICATIONID }}'
57-
excludes: '.vscode docs'
58-
```
59-
60-
### Configuring Secrets
61-
#### 1. Go to your repository where you want to configure the workflow
62-
#### 2. Under your repository name, click **Settings**
63-
64-
![Settings tab](https://cdn.discordapp.com/attachments/646857534963056661/1071150086379274240/image.png)
65-
66-
#### 3. In the "Security" section of the sidebar, select **Secrets and varibles**, then click **Actions**
67-
68-
![Secrets and variables](https://cdn.discordapp.com/attachments/646857534963056661/1071150900455931925/image.png)
6947

70-
#### 4. In the **Secrets** tab, click **New repository secret**
71-
72-
<img src="https://media.discordapp.net/attachments/646857534963056661/1071152354491121754/image.png" height="180"></img>
73-
74-
#### 5. Type a name for your secret in the **Name** input box.
75-
#### 6. Enter the value for your secret
76-
#### 7. Click **Add secret.**
77-
#### 8. And you're done, your Secrets are configured and you're ready to use the workflow
78-
79-
<img src="https://cdn.discordapp.com/attachments/646857534963056661/1071153498282004490/image.png" height="480"></img>
48+
```
8049

8150
# Contributors
82-
We are currently accepting all kinds of suggestions and contributions. All you have to do is open an Issue or a Pull Request!
8351

84-
Created with ❤ by [richaardev](https://github.com/richaardev)
52+
We are currently accepting all kinds of suggestions and contributions. All you have to do is open an Issue or a Pull Request!

0 commit comments

Comments
 (0)