Skip to content

Commit cee60a6

Browse files
authored
Update start course button (#45)
* update-start-course-button * Update README.md
1 parent 36577fa commit cee60a6

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

README.md

+33-21
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,25 @@ Create two deployment workflows using GitHub Actions and Microsoft Azure.
3131

3232
## How to start this course
3333

34+
<!-- For start course, run in JavaScript:
35+
'https://github.com/new?' + new URLSearchParams({
36+
template_owner: 'skills',
37+
template_name: 'deploy-to-azure',
38+
owner: '@me',
39+
name: 'skills-deploy-to-azure',
40+
description: 'My clone repository',
41+
visibility: 'public',
42+
}).toString()
43+
-->
44+
45+
[![start-course](https://user-images.githubusercontent.com/1221423/235727646-4a590299-ffe5-480d-8cd5-8194ea184546.svg)](https://github.com/new?template_owner=skills&template_name=deploy-to-azure&owner=%40me&name=skills-deploy-to-azure&description=My+clone+repository&visibility=public)
46+
3447
1. Right-click **Start course** and open the link in a new tab.
35-
<br />[![start-course](https://user-images.githubusercontent.com/1221423/218596841-0645fe1a-4aaf-4f51-9ab3-8aa2d3fdd487.svg)](https://github.com/skills/continuous-delivery-azure/generate)
36-
2. In the new tab, follow the prompts to create a new repository.
48+
2. In the new tab, most of the prompts will automatically fill in for you.
3749
- For owner, choose your personal account or an organization to host the repository.
38-
- We recommend creating a public repositoryprivate repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
39-
![Create a new repository](https://user-images.githubusercontent.com/1221423/218594143-e60462b6-9f2a-4fa3-80de-063ac5429aab.png)
40-
3. After your new repository is created, wait about 1 minute, then refresh the page. Follow the step-by-step instructions in the new repository's README.
50+
- We recommend creating a public repository, as private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
51+
- Scroll down and click the **Create repository** button at the bottom of the form.
52+
3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.
4153

4254
</details>
4355

@@ -61,7 +73,7 @@ We'll use labels as triggers for multiple tasks:
6173
At the start of each workflow run, GitHub automatically creates a unique `GITHUB_TOKEN` secret to use in your workflow. We need to make sure this token has the permissions required for this course.
6274

6375
1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
64-
1. Go to Settings > Actions > General. Ensure that the `GITHUB_TOKEN` also has **Read and write permissions** enabled under **Workflow permissions**. This is required for your workflow to be able to upload your image to the container registry.
76+
1. Go to Settings > Actions > General. Ensure that the `GITHUB_TOKEN` also has **Read and write permissions** enabled under **Workflow permissions**. This is required for your workflow to be able to upload your image to the container registry.
6577

6678
### :keyboard: Activity 2: Configure a trigger based on labels
6779
For now, we'll focus on staging. We'll spin up and destroy our environment in a later step.
@@ -99,7 +111,7 @@ For now, we'll focus on staging. We'll spin up and destroy our environment in a
99111

100112
_Good job getting started :gear:_
101113

102-
### Nice work triggering a job on specific labels
114+
### Nice work triggering a job on specific labels
103115

104116
We won't be going into detail on the steps of this workflow, but it would be a good idea to become familiar with the actions we're using. They are:
105117

@@ -139,15 +151,15 @@ We won't be going into detail on the steps of this workflow, but it would be a g
139151
}
140152
]
141153
```
142-
1. In your terminal, run the command below.
154+
1. In your terminal, run the command below.
143155
```shell
144156
az ad sp create-for-rbac --name "GitHub-Actions" --role contributor \
145157
--scopes /subscriptions/{subscription-id} \
146158
--sdk-auth
147159
148160
# Replace {subscription-id} with the same id stored in AZURE_SUBSCRIPTION_ID.
149-
```
150-
> **Note**: The `\` character works as a line break on Unix based systems. If you are on a Windows based system the `\` character will cause this command to fail. Place this command on a single line if you are using Windows.**
161+
```
162+
> **Note**: The `\` character works as a line break on Unix based systems. If you are on a Windows based system the `\` character will cause this command to fail. Place this command on a single line if you are using Windows.**
151163
7. Copy the entire contents of the command's response, we'll call this `AZURE_CREDENTIALS`. Here's an example of what it looks like:
152164
```shell
153165
{
@@ -306,8 +318,8 @@ Personal access tokens (PATs) are an alternative to using passwords for authenti
306318

307319
To deploy successfully to our Azure environment:
308320

309-
1. Create a new branch called `azure-configuration` by clicking on the branch dropdown on the top, left hand corner of the `Code` tab on your repository page.
310-
2. Once you're in the new `azure-configuration` branch, go into the `.github/workflows` directory and create a new file titled `spinup-destroy.yml` by clicking **Add file**.
321+
1. Create a new branch called `azure-configuration` by clicking on the branch dropdown on the top, left hand corner of the `Code` tab on your repository page.
322+
2. Once you're in the new `azure-configuration` branch, go into the `.github/workflows` directory and create a new file titled `spinup-destroy.yml` by clicking **Add file**.
311323

312324
<details>
313325
<summary>Copy and paste the following into this new file:</summary>
@@ -383,10 +395,10 @@ To deploy successfully to our Azure environment:
383395
```
384396
</details>
385397

386-
3. Click **Commit changes...** and select `Commit directly to the azure-configuration branch.` before clicking **Commit changes**.
387-
4. Go to the Pull requests tab of the repository.
388-
5. There should be a yellow banner with the `azure-configuration` branch where you can click **Compare & pull request**.
389-
6. Set the title of the Pull request to: `Added spinup-destroy.yml workflow` and click `Create pull request`.
398+
3. Click **Commit changes...** and select `Commit directly to the azure-configuration branch.` before clicking **Commit changes**.
399+
4. Go to the Pull requests tab of the repository.
400+
5. There should be a yellow banner with the `azure-configuration` branch where you can click **Compare & pull request**.
401+
6. Set the title of the Pull request to: `Added spinup-destroy.yml workflow` and click `Create pull request`.
390402

391403
We will cover the key functionality below and then put the workflow to use by applying a label to the pull request.
392404

@@ -429,16 +441,16 @@ _Nicely done, you used a workflow to spin up your Azure environment :dancer:_
429441

430442
Now that the proper configuration and workflow files are present, let's test our actions! In this step, there's a small change to the game. Once you add the appropriate label to your pull request, you should be able to see the deployment!
431443

432-
1. Create a new branch named `staging-test` from `main` using the same steps as you did for the previous `azure-configuration` branch.
433-
1. Edit the `.github/workflows/deploy-staging.yml` file, and replace every `<username>` with your GitHub username.
444+
1. Create a new branch named `staging-test` from `main` using the same steps as you did for the previous `azure-configuration` branch.
445+
1. Edit the `.github/workflows/deploy-staging.yml` file, and replace every `<username>` with your GitHub username.
434446
1. Commit that change to the new `staging-test` branch.
435-
1. Go to the Pull requests tab and there should be a yellow banner with the `staging-test` branch to `Compare & pull request`. Once the pull request is opened up, click `Create pull request`.
447+
1. Go to the Pull requests tab and there should be a yellow banner with the `staging-test` branch to `Compare & pull request`. Once the pull request is opened up, click `Create pull request`.
436448

437449
### :keyboard: Activity 1: Add the proper label to your pull request
438450

439451
1. Ensure that the `GITHUB_TOKEN` for this repository has read and write permissions under **Workflow permissions**. [Learn more](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token). This is required for your workflow to be able to upload your image to the container registry.
440452
1. Create and apply the `stage` label to your open pull request
441-
1. Wait for the GitHub Actions workflow to run and deploy the application to your Azure environment. You can follow along in the Actions tab or in the pull request merge box. The deployment may take a few moments but you've done the right thing. Once the deployment is successful, you'll see green check marks for each run, and you'll see a URL for your deployment. Play the game!
453+
1. Wait for the GitHub Actions workflow to run and deploy the application to your Azure environment. You can follow along in the Actions tab or in the pull request merge box. The deployment may take a few moments but you've done the right thing. Once the deployment is successful, you'll see green check marks for each run, and you'll see a URL for your deployment. Play the game!
442454
1. Once the workflow has completed, refresh this page for the next step.
443455

444456
</details>
@@ -559,7 +571,7 @@ Copy and paste the following to your file, and replace any `<username>` placehol
559571
az cache purge
560572
az account clear
561573
```
562-
1. Update every `<username>` to your GitHub username.
574+
1. Update every `<username>` to your GitHub username.
563575
1. Commit your changes to the `production-deployment-workflow` branch.
564576
1. Go to the Pull requests tab and click **Compare & pull request** for the `production-deployment-workflow` branch and create a Pull request.
565577

0 commit comments

Comments
 (0)