Skip to content

Commit c954c2d

Browse files
Updates documentation
1 parent c7b8378 commit c954c2d

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

README.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You’ll be asked to login again, and afterwards your token will be displayed li
2424
token: a142e09a6b13a21be512b141241c7123
2525
```
2626

27-
![Getting your token from the Surge CLI.](http://localhost:5001/images/help/integrating-with-circleci.gif)
27+
![Getting your token from the Surge CLI.](https://surge.sh/images/help/integrating-with-circleci.gif)
2828

2929
### Adding Surge as a `devDependency` to a `package.json` file
3030

@@ -70,7 +70,7 @@ Commit this change, and push it to your repo. Now, even if you don’t have test
7070

7171
Now you can login and setup a new project on CircleCI. Choose the GitHub organisation your project is in (_surge-sh_ in this example) and then build your project’s GitHub repository:
7272

73-
![Add the GitHub repository your project is stored in. This example is using the surge-sh/example-circleci repo.](http://localhost:5001/images/help/integrating-with-circleci-2.png)
73+
![Add the GitHub repository your project is stored in. This example is using the surge-sh/example-circleci repo.](https://surge.sh/images/help/integrating-with-circleci-2.png)
7474

7575
### Add Environment Variables
7676

@@ -84,7 +84,7 @@ SURGE_LOGIN
8484

8585
…and set it to the email address you use with Surge.
8686

87-
![Adding SURGE_TOKEN` as an environment variable.](http://localhost:5001/images/help/integrating-with-circleci-3.png)
87+
![Adding SURGE_TOKEN` as an environment variable.](https://surge.sh/images/help/integrating-with-circleci-3.png)
8888

8989
Next, add another environment variable called:
9090

@@ -94,16 +94,30 @@ SURGE_TOKEN
9494

9595
…and set it to your Surge token.
9696

97-
![Adding SURGE_TOKEN` as an environment variable.](http://localhost:5001/images/help/integrating-with-circleci-4.png)
97+
![Adding SURGE_TOKEN` as an environment variable.](https://surge.sh/images/help/integrating-with-circleci-4.png)
9898

99-
## Run Surge on CircleCI
99+
### Push a `circle.yml` file
100100

101-
Now you’re ready to run your deployment step with `surge` on CircleCI.
101+
The last step is to add a `circle.yml` file to your project.
102102

103+
> …the`circle.yml` file makes it easy to tell CircleCI what you need. This is a simple YAML file where you spell out any tweaks required for your web app. You place the file in your git repo's root directory and CircleCI reads the file each time it runs a build.
104+
> <footer>CircleCI <cite>[Configuring CircleCI](https://circleci.com/docs/configuration)</cite></footer>
103105
104-
***
106+
Your `circle.yml` file should look something like this:
105107

106-
Now, when you push your project to GitHub again, this command will be run and your project will get published automatically.
108+
```yml
109+
deployment:
110+
production:
111+
branch: master
112+
commands:
113+
- surge --project ./path/to/your-project --domain your-project.surge.sh
114+
```
115+
116+
After you push to your repository, CircleCI will run this `surge` command. Replace `./path/to/your-project` with the path to the source files in your repository, and `your-project.surge.sh` with the domain you’d like to publish to.
117+
118+
There are more examples of what you can do with a `circle.yml` file [directly from CircleCI](https://circleci.com/docs/configuration).
119+
120+
Now, when you push your project to GitHub again, your deployment command will be run and your project will get published automatically.
107121

108122
## License
109123

0 commit comments

Comments
 (0)